package org.example.mall.Pojo;

import lombok.Data;

import java.sql.Timestamp;

@Data
public class OrderDetail {
    //订单号
    private Integer oId;
    private Products productPreview;
    private String userName;
    //订单状态
    private Integer status;
    //订单创建时间
    private Timestamp createDate;
    //订单完成(关闭)时间
    private Timestamp completeDate;
    //实付价格
    private Float price;
    //收货人
    private ConsigneeInfo consignee;

    public OrderDetail(Order order, Products pPreview, ConsigneeInfo consignee) {
        this.oId = order.getOId();
        this.userName = order.getUserName();
        this.status = order.getStatus();
        this.createDate = order.getCreateDate();
        this.completeDate = order.getCompleteDate();
        this.price = order.getPrice();

        this.productPreview = pPreview;
        this.consignee = consignee;
    }
}
